package com.jr9z.jrjz.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MvcConfig implements WebMvcConfigurer {

   /* @Autowired
    private FileUploadProperties fileUploadProperties;*/

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
       //主体框架
        registry.addViewController("/").setViewName("index");
        registry.addViewController("/admin").setViewName("admin");
    }

   /* @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler(fileUploadProperties.getStaticAccessPath())
                .addResourceLocations("file:"+fileUploadProperties.getUploadFolder()+"/");
    }
*/
}